<?php
class LocationAction extends Action {
    public function index() {
        header("Content-type:text/html;charset=utf-8");
        
        $ip = get_client_ip();
        echo $ip;
        import('ORG.Net.IpLocation');// 导入IpLocation类
        $Ip = new IpLocation(); // 实例化类
        $location = $Ip->getlocation('www.nfsysu.cn'); // 获取某个IP地址所在的位置
        dump($location);
    }
}